import request from '@/utils/request';

// 新增测试单表
export const contractAi = (data) => {
  return request({
    url: '/business/contract',
    method: 'post',
    data: data
  });
};

// 发送信息
// export const sendMessageContent = (data) => {
//   return request({
//     url: '/business/contract/analysis',
//     method: 'post',
//     data: data
//   });
// };

// 发送信息
export const sendMessageContentPic = (data) => {
  return request({
    url: '/business/contract/analysisAnnotations',
    method: 'post',
    data: data
  });
};

// 查询测试单表列表
export const listChatConfig = (query?: any) => {
  return request({
    url: '/business/chatConfig/list',
    method: 'get',
    params: query
  });
};

// 查询测试单表详细
export const getChatConfig = (id) => {
  return request({
    url: '/business/chatConfig/detail?aiChatId=' + id,
    method: 'get'
  });
};

// 新增测试单表
export const addChatConfig = (data) => {
  return request({
    url: '/business/chatConfig',
    method: 'post',
    data: data
  });
};

// 修改测试单表
export const updateChatConfig = (data) => {
  return request({
    url: '/business/chatConfig',
    method: 'put',
    data: data
  });
};

// 删除测试单表
export const delChatConfig = (id) => {
  return request({
    url: '/business/chatConfig/' + id,
    method: 'delete'
  });
};

// 查询测试单表
export const getAiAskList = (params) => {
  return request({
    url: '/business/contractTask/list',
    method: 'get',
    params: params
  });
};

// 查询测试单表
export const detAiAskList = (params) => {
  return request({
    url: '/business/contractTask/' + params,
    method: 'delete'
  });
};

// 查询测试单表
export const getContractTaskImage = (params) => {
  return request({
    url: '/business/contractTaskImage/list?taskId=' + params,
    method: 'get'
  });
};
